<?php include view('header');?>

<h1>管理员列表</h1>
<div class="list">
	<table>
		<thead><tr><td></td><td>ID</td><td>账号</td><td>邮箱</td><td>上次登录时间</td><td>操作</td></tr></thead>
		<tbody>
		<?php foreach($adminlist as $u){?>
		<tr>
			<td width="40"><img src="<?php echo $u['avatar'];?>" width="40" onerror="this.src='./image/noavatar.gif';" /></td>
			<td><?php echo $u['uid'];?></td>
			<td><?php echo $u['username'];?></td>
			<td><?php echo $u['email']?></td>
			<td><?php echo $u['logintime'] ? rgmdate($u['logintime']) : '从未登录';?></td>
			<td><a href="system.php?action=editadmin&uid=<?php echo $u['uid'];?>">[编辑]</a> <a href="system.php?action=deleteadmin&uid=<?php echo $u['uid'];?>">[删除]</a></td>
		</tr>
		<?php }?>
		</tbody>
	</table>
	<?php echo Tpl::mpage($admintotal, $page, $limit, 'admincp.php?action=listadmin');?>
</div>

<?php include view('footer');?>